package ai.plantdata.util;

import ai.plantdata.constant.TableEnum;
import ai.plantdata.dao.strategy.SeparateHandle;
import ai.plantdata.dao.strategy.impl.ConceptAssociateConcept;
import ai.plantdata.dao.strategy.impl.EntityAssociateConcept;
import ai.plantdata.dao.strategy.impl.EntityExpand;
import ai.plantdata.dao.strategy.impl.NoAssociationConcept;
import ai.plantdata.dao.strategy.impl.NoAssociationEntity;

public class SeparateStrategyUtils {
    public static SeparateHandle select(TableEnum tableEnum) {
        switch (tableEnum) {
            case CONCEPT_TABLE:
                return new NoAssociationConcept();
            case ENTITY_TABLE:
                return new NoAssociationEntity();
            case ENTITY_EXTENSION_TABLE:
                return new EntityExpand();
            case ENTITY_ASSOCIATE_CONCEPT:
                return new EntityAssociateConcept();
            case CONCEPT_ASSOCIATE_CONCEPT:
                return new ConceptAssociateConcept();
            default:
                throw new RuntimeException("请选择正确的表类型");
        }
    }
}
